//
// Created by lihengliu on 2023/2/24.
//
#include "calculator.h"

int Calculator::getArea(int a, int b) {
    return a * b;
}

int Calculator::doSimpleCalculate(int a, int b, char ch) {
    int result = 0;
    switch (ch) {
        case '+': {
            result = a + b;
            break;
        }
        case '-':{
            result = a - b;
            break;
        }
        case '*': {
            result = a * b;
            break;
        }
        case '/': {
            result = a / b;
            break;
        }
        default:
            break;
    }
    return result;
}

